-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Carpooling POC #6791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev-2.x
Are you sure you want to change the base?
Carpooling POC #6791
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6791 +/- ##
=============================================
- Coverage 72.18% 71.78% -0.41%
- Complexity 19840 20007 +167
=============================================
Files 2155 2182 +27
Lines 80051 81158 +1107
Branches 8082 8197 +115
=============================================
+ Hits 57786 58257 +471
- Misses 19419 20039 +620
- Partials 2846 2862 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7ef5e89 to
79de33f
Compare
ba29af0 to
800d5a3
Compare
0a24110 to
7067369
Compare
…dimentary search. Next I want to implement actual A* functionality.
…up the CarpoolingRepository a bit.
… heuristic to improve performance.
7067369 to
408397a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a partial review so you can fix some things before I have time to review the rest
application/src/ext/java/org/opentripplanner/ext/carpooling/configure/CarpoolingModule.java
Show resolved
Hide resolved
| * - More than {@code maxDelay} additional wait time at their pickup location | ||
| * - More than {@code maxDelay} later arrival at their dropoff location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't waiting at the pickup location automatically mean later arrival to the dropoff location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but you may experience a greater delay to your scheduled dropoff than your pickup, if say, there is a new pickup inserted before your pickup and a another one before your dropoff. So the delay at your pickup is t, but the delay at your dropoff may be t+t1.
...n/src/ext/java/org/opentripplanner/ext/carpooling/constraints/PassengerDelayConstraints.java
Outdated
Show resolved
Hide resolved
...n/src/ext/java/org/opentripplanner/ext/carpooling/constraints/PassengerDelayConstraints.java
Outdated
Show resolved
Hide resolved
...n/src/ext/java/org/opentripplanner/ext/carpooling/constraints/PassengerDelayConstraints.java
Outdated
Show resolved
Hide resolved
application/src/ext/java/org/opentripplanner/ext/carpooling/filter/FilterChain.java
Outdated
Show resolved
Hide resolved
application/src/ext/java/org/opentripplanner/ext/carpooling/filter/TimeBasedFilter.java
Outdated
Show resolved
Hide resolved
...ication/src/ext/java/org/opentripplanner/ext/carpooling/internal/CarpoolItineraryMapper.java
Show resolved
Hide resolved
|
|
||
| // Passenger start time is max of request time and when driver arrives | ||
| var startTime = request.dateTime().isAfter(driverPickupTime.toInstant()) | ||
| ? request.dateTime().atZone(ZoneId.of("Europe/Oslo")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly weird hardcoded timezone. I think you could fetch the actual timezone from the transitservice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, agree. Will address.
| .withFrom(Place.normal(fromVertex, new NonLocalizedString("Carpool boarding"))) | ||
| .withTo(Place.normal(toVertex, new NonLocalizedString("Carpool alighting"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could translate these with internals.properties thingy, but that's up to you.
| * {@link org.opentripplanner.ext.carpooling.CarpoolingRepository}. | ||
| * {@link CarpoolingRepository}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a comment about usage of a full path instead of importing a class in code, but for javadoc, you should use the full path instead of importing when the referenced class isn't imported for other reasons. You made the same change in some other places as well in the recent commit.
Summary
This PR introduces carpooling as a sandbox feature in OTP, enabling passengers to be matched with shared carpool trips and integrating carpooling into multi-modal journey planning.
Key capabilities:
Implementation approach:
OTPFeature.CarPoolingtoggleContext:
This POC enables pilot programs where carpooling services integrate with public transit. Development is expected to take at least one year as we refine the feature based on pilot feedback and work with SIRI standardization in parallel.
What's Included
Core Routing
Data Management
SiriETCarpoolingUpdaterPerformance Optimizations
API Integration
CarpoolLeg)What's NOT Included (Future Work)
Not in this PR:
Configuration
Enable feature:
Issue
Part of #7012 (carpooling feature request)
Supersedes #6604 (original POC issue)
Unit tests
189+ carpooling-specific tests (100% passing)
Test infrastructure includes builders and mocks for fast, isolated testing without graph infrastructure.
Documentation
JavaDoc throughout codebase
Changelog
Added:
Configuration:
Bumping the serialization version id
N/A - Sandbox feature does not require serialization bump (carpool trips stored in-memory only, not in graph.obj).
Migration / Compatibility
No breaking changes - all functionality behind OTPFeature.CarPooling toggle (disabled by default).